package com.example.japtest.util;


import java.io.File;
import java.io.FileInputStream;

/**
 * @Author 赵云龙
 * @Date 2020/11/15
 * @Description TODO
 */

public class TestDemo {

    public static void main(String[] args) {

        try {
            File file = new File("G:\\测试\\源码\\resources\\test");
            File[] files = file.listFiles();

            FileInputStream fileInputStream = null;

            for (int i = 0; i < files.length; i++) {
                File subfile = files[i];
                File[] resFiles = subfile.listFiles();
                for (int j = 0; j < resFiles.length; j++) {
//                    System.out.println(subfile.getName());
                    File subResFile = resFiles[j];
                    String str = subfile.getName() + "::---" + subResFile.getName();
//                    System.out.println(str);
                    fileInputStream = new FileInputStream(subResFile);
                    StringBuffer stringBuffer = new StringBuffer();
                    byte[] buf = new byte[1024];
                    int read ;
                    while ((read = fileInputStream.read(buf)) != -1) {
                        stringBuffer.append(new String(buf, 0, buf.length));
                    }

                    String s = stringBuffer.toString();
//                    if (s.contains("\"@+id/cj\"") && s.contains("WeImageView") ){
                    if (s.contains("album_dyna_photo_ui_title") ){
                        System.out.println(str);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }






    }
}
